package com.intretech.umsin.system.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.intretech.umsin.common.web.ApiResult;
import com.intretech.umsin.system.param.SysRoleParam;
import com.intretech.umsin.system.vo.SysRoleVo;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @version V1.0
* 角色信息: sys_role 为其他服务提供内部调用接口 API.
* @InterfaceName: SysRoleApi
* @Description: 角色信息:sys_role 为其他服务提供内部调用接口 API.
* @author: 李启联
* @date:   2022-8-16 16:44:07
* @Copyright: Copyright (c) 2022
*/

public interface SysRoleApi {

    @GetMapping("/system/sysrole/get/{id}")
    public ApiResult<SysRoleVo> querySysRoleById(@PathVariable("id") String id);

    @PostMapping("/system/sysrole/listByIds")
    public ApiResult<List<SysRoleVo>> querySysRoleByIds(@RequestBody List<String> ids);

    @PostMapping("/system/sysrole/page/{pageNo}/{pageSize}")
    public ApiResult<IPage<SysRoleVo>> querySysRoleForPage(@RequestBody SysRoleParam params, @PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize);

    @PostMapping("/system/sysrole/list")
    public ApiResult<List<SysRoleVo>> querySysRoleForList(@RequestBody SysRoleParam params);

    @PostMapping("/system/sysrole/add")
    public ApiResult<SysRoleVo> addSysRole(@RequestBody SysRoleVo vo);

    @PostMapping("/system/sysrole/adds")
    public ApiResult<List<SysRoleVo>> addsSysRole(@RequestBody List<SysRoleVo> voList);

    @PutMapping("/system/sysrole/modify")
    public ApiResult<SysRoleVo> modifySysRole(@RequestBody SysRoleVo vo);

    @PutMapping("/system/sysrole/modifys")
    public ApiResult<List<SysRoleVo>> modifysSysRole(@RequestBody List<SysRoleVo> voList);

    @DeleteMapping("/system/sysrole/remove/{id}")
    public ApiResult<Void> removeSysRole(@PathVariable("id") String id);

    @DeleteMapping("/system/sysrole/removes")
    public ApiResult<Void> removesSysRole(@RequestBody List<String> ids);


}